<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="vue.js"></script>
</head>

<body>
  <div id="app">
    <div class="floor" v-for="(floor,index) in floors">
      <h2>{{ floor.title }}</h2>
      <ul>
        <li v-for="(item,index2) in floor.items">
          <h4>{{ item.name }}</h4>
          <p> {{item.price}} </p>
        </li>
      </ul>
    </div>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data: {
        
        floors: [{
            title: "手机",
            items: [{
                name: "小米10",
                price: 17
              },
              {
                name: "小米电视5",
                price: 19
              }
            ]
          },
          {
            title: "电视",
            items: [{
                name: "商品2",
                price: 17
              },
              {
                name: "商品4",
                price: 19
              }
            ]
          },
          {
            title: "电脑",
            items: [{
                name: "电脑1",
                price: 17
              },
              {
                name: "电脑1",
                price: 19
              }
            ]
          }
        ]
      }
    })
  </script>
</body>

</html>